package com.bootdo.wechat.service.impl;

import com.bootdo.common.config.ApplicationContextRegister;
import com.bootdo.wechat.dao.MpConfigDao;
import com.bootdo.wechat.domain.MpConfigDO;
import com.bootdo.wechat.service.MpConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;



@Service
public class MpConfigServiceImpl implements MpConfigService {
	@Autowired
	private MpConfigDao mpConfigDao;
	
	@Override
	public MpConfigDO get(String mpId){
		return mpConfigDao.get(mpId);
	}

	@Override
	public MpConfigDO selectById(String id){
		return mpConfigDao.selectById(id);
	}
	
	@Override
	public List<MpConfigDO> list(Map<String, Object> map){
		return mpConfigDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return mpConfigDao.count(map);
	}
	
	@Override
	public int save(MpConfigDO mpConfig){
		return mpConfigDao.save(mpConfig);
	}
	
	@Override
	public int update(MpConfigDO mpConfig){
		return mpConfigDao.update(mpConfig);
	}
	
	@Override
	public int remove(String mpId){
		return mpConfigDao.remove(mpId);
	}
	
	@Override
	public int batchRemove(String[] mpIds){
		return mpConfigDao.batchRemove(mpIds);
	}

	@Override
	public  List<MpConfigDO> selectMpList(){
		MpConfigDao mpConfigDao = ApplicationContextRegister.getBean(MpConfigDao.class);
		return mpConfigDao.selectMpList();
	}
	
}
